//引入axios
import request from '@/utils/request.js';

//获取首页信息
export function getHomeinfo() {
  const id = localStorage.getItem('UserId')
  const url = `users/${id}`
  return request({
    url: url,
    method: 'get',
    params: {},
    headers: {
        'Content-Type': 'application/json',
        addToken: true      // 指示不需要在请求头中添加 token
      }
  })
}

//获取用户信息
export function getUsersinfo() {
  const id = localStorage.getItem('UserId')
  const url = `users/${id}`
  return request({
    url: url,
    method: 'get',
    params: {},
    headers: {
        'Content-Type': 'application/json',
        addToken: true      // 指示不需要在请求头中添加 token
      }
  })
}
